<?php

namespace RecetteAnne\ApplicationBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Profil
 *
 * @ORM\Table(name="profil")
 * @ORM\Entity
 */
class Profil {

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="abrege", type="string", length=10, nullable=true)
     */
    private $abrege;

    /**
     * @var integer
     *
     * @ORM\Column(name="libelle", type="integer", nullable=true)
     */
    private $libelle;

    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\ManyToMany(targetEntity="Role", inversedBy="refProfil")
     * @ORM\JoinTable(name="profil_role",
     *   joinColumns={
     *     @ORM\JoinColumn(name="ref_profil", referencedColumnName="id")
     *   },
     *   inverseJoinColumns={
     *     @ORM\JoinColumn(name="ref_role", referencedColumnName="code")
     *   }
     * )
     */
    private $refRole;

    /**
     * Constructor
     */
    public function __construct() {
        $this->refRole = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set abrege
     *
     * @param string $abrege
     * @return Profil
     */
    public function setAbrege($abrege) {
        $this->abrege = $abrege;

        return $this;
    }

    /**
     * Get abrege
     *
     * @return string 
     */
    public function getAbrege() {
        return $this->abrege;
    }

    /**
     * Set libelle
     *
     * @param integer $libelle
     * @return Profil
     */
    public function setLibelle($libelle) {
        $this->libelle = $libelle;

        return $this;
    }

    /**
     * Get libelle
     *
     * @return integer 
     */
    public function getLibelle() {
        return $this->libelle;
    }

    /**
     * Add refRole
     *
     * @param \RecetteAnne\ApplicationBundle\Entity\Role $refRole
     * @return Profil
     */
    public function addRefRole(\RecetteAnne\ApplicationBundle\Entity\Role $refRole) {
        $this->refRole[] = $refRole;

        return $this;
    }

    /**
     * Remove refRole
     *
     * @param \RecetteAnne\ApplicationBundle\Entity\Role $refRole
     */
    public function removeRefRole(\RecetteAnne\ApplicationBundle\Entity\Role $refRole) {
        $this->refRole->removeElement($refRole);
    }

    /**
     * Get refRole
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getRefRole() {
        return $this->refRole;
    }

}
